﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WebApplication.administrator
{
    public partial class Admin : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {

            if (null == Session["Admin"] || Session["Admin"].ToString() == "Guest")
            {
                Session["Admin"] = "Guest";
                btnSignout.Visible = false;
                Response.Redirect("Login.aspx");
            }
            else
            {
                
                btnSignout.Visible = true;
            }
                
            

        }
        public void btnSignout_Click(object sender, EventArgs e)
        {
            Session.Clear();
            Session.Abandon();
            Response.Redirect("Login.aspx");
        }
    }
}